package sj.sj3;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/sj3")
public class Sj3Controller {

    @RequestMapping("/sj3")
    public String hello3(){
        //跳转到sj3.jsp
        return "sj3";
    }

    @RequestMapping("/show")
    public String show(Model model,@RequestParam String account){
//        model.addAttribute("account",account);
        model.addAttribute(account);
        System.out.println(account);
        //跳转到show.jsp
        return "show";
    }

}
